import request from "@/utils/request";


//创建
export function createGroup(data) {
  return request({
    url: '/apiGroup/create',
    method: 'post',
    data: data
  })
}

//删除
export function deleteGroup(id) {
  return request({
    url: '/apiGroup/' + id,
    method: 'delete'
  })
}

//更新分组
export function editGroup(data) {
  return request({
    url: '/apiGroup/update',
    method: 'put',
    data: data
  })
}

//获取项目分组
export function getGroupAll(projectId) {
  return request({
    url: '/apiGroup/list',
    method: 'get',
    params: {
      projectId
    }
  })
}


//获取所有分组
export function getGroup(pageIndex, pageSize) {
  return request({
    url: '/apiGroup/listAll',
    method: 'get',
    params: {
      pageIndex,
      pageSize,
    }
  })
}

//根据id查询分组
export function getGroupById(id) {
  return request({
    url: '/apiGroup/' + id,
    method: 'get',
  })
}



